<!DOCTYPE HTML>
<html>
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" >
		<title>自定义插件-helloworld</title>
		<style>
			.enty-editor {height:400px;border:1px solid;}
			.box {width:800px;margin:0 auto;}
			.ex {margin:24px 0;}
		</style>
		<link href="style/css/editor.css" type="text/css" rel="stylesheet" />
		<link href="style/css/panel.css" type="text/css" rel="stylesheet" />
		<script>
			if(window.console) {
				window.console = {};
				window.console.log = function(){};
			}
		</script>
		<script type="text/javascript" src="js/sinaeditor_min.js"></script>
		<script type="text/javascript" src="js/plugins/helloworld.js"></script>
	</head>
	<body>
		<div class="box">
			<div class="ex">示例的说明文档可以在<a target="_blank" href="http://code.google.com/p/sinaeditor/wiki/CustomPlugins">这里</a>进行查阅</div>
			<div class="pro_tools" id="testSaveButtons"></div>
			<div id="frame" class="enty-editor">
				<textarea id="frameToText" class="se_textarea"></textarea>
			</div>
		</div>
		<script>
			window.onload = function(){
                var config = {
                    "id": "myEditor",
                    //编辑器的按钮存放的base dom id 或者dom
                    "toolBase": 'testSaveButtons',
                    "initType": {
                        "name": "initFromStatic",
                        "args": {
                            "parent": document.getElementById('frame')
                        }
                    },
                    //可选
                    "filter": {
                        "name": "pasteFilter",
                        "args": {
                            "tagName": "SCRIPT|INPUT|IFRAME|TEXTAREA|SELECT|BUTTON",
                            "noFlashExchange": false,
                            "attribute": "id"
                        }
                    },
                    "editorName": 'SinaEditor._.entyimpl.normalEditor',
                    "styles": "body {\
									margin:0px;\
									padding:0px;\
									width:100%;\
									height:100%;\
								}\
								.biaoqing {\
									width:22px;\
									height:22px;\
								}",
                    "styleLinks": ["http://hiphone.sinaapp.com/editor/style/contents.css"],
                    "plugns": [{
                        "name": "addContent"
                    },{
                        "name": "showSource",
                        "args": {
							"entyArea": document.getElementById('frameToText')
                        }
                    },
					{
                        "name": "link"
                    },{
                        "name": "backcolor"
                    },
					{
                        "name": "forecolor"
                    }, {
                        "name": "underline"
                    },{
                        "name": "italic"
                    }, {
                        "name": "bold"
                    }, {
                        "name": "linkBubble"
                    }, {
                        "name": "imgBubble"
                    }, {
                        "name": "flashBubble"
                    }, {
                        "name": "redoManager"
                    }, {
                        "name": "fontFamily"
                    }, {
                        "name": "fontSize"
                    }, {
                        "name": "markList"
                    }, {
                        "name": "numberList"
                    }, {
                        "name": "indent"
                    }, {
                        "name": "outdent"
                    }, {
                        "name": "justifyright"
                    }, {
                        "name": "justifycenter"
                    }, {
                        "name": "justifyleft"
                    }, {
                        "name": "imgUI"
                    }, {
                        "name": "flashUI"
                    }, {
                        "name": "tableUI"
                    }, {
                        "name": "faceUI"
                    },{
                        "name": "historyUI",
						"args" : {
							"id" : 1
						}
                    },{
                        "name": "helloworld"
                    }]
                };

                window.editor1 = SinaEditor.createEditor(config);
            }
		</script>
	</body>
</html>